﻿Imports TBCC.Utility

Public Class CcapSetPortService
    ''' <summary>
    ''' 查询压缩机组的端口
    ''' </summary>
    ''' <param name="projectId">项目编号</param>
    ''' <returns>返回压缩机组口信息</returns>
    Public Function GetPorts(ByVal projectId As String)
        Dim ds As DataSet = Nothing
        Dim strSql As String = String.Empty

        strSql = " SELECT A.Id,A.DevId,B.csNetId,A.CpsLostPowerAlarmPort, A.CpsBreakDownAlarmPort  " + _
                " FROM `tbccCcapPortSet` AS A " + _
                " Inner Join `tbccCcapDevType` AS B  ON A.DevId = B.Id " + _
                " WHERE B.ProjectId='" + projectId + "'"

        Try
            ds = SqlHelper.ExecuteDataset(strSql, Nothing)
        Catch ex As Exception
            ds = Nothing
        End Try

        Return ds
    End Function

End Class
